import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'
import List from './views/List.vue'
import Article from './views/Article.vue'
Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/list/:type/:id',
      name: 'list',
      component: List
    },
    {
      path: '/article/:id',
      name: 'article',
      component:Article
    },
    {
      path:'*',
      redirect:'/list/recommend/all'
    }
  ]
})
